
var puts = document.querySelectorAll('input')
var but = document.querySelector('button')
but.onclick = () => {
    axios.post('/user/login', { phone: puts[0].value, pass: puts[1].value }).then((res) => {
        if (res.data.code == 200) {
            localStorage.setItem('userinfo', JSON.stringify(res.data.userinfo));
            alert('登陆成功')
            location.href = './index.html'
        } else {
            alert('登陆失败')
        }

    })
}
